package com.huluobo.lib_base.room

import android.content.Context
import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
import com.huluobo.lib_base.entity.User
import dagger.hilt.android.qualifiers.ApplicationContext

/**
 *  Created by LC on 2025/4/1.
 */
@Database(entities = [User::class], version = 1, exportSchema = false)
abstract class AppDatabase : RoomDatabase() {
    abstract fun userDao(): UserDao

    companion object {
        fun init(@ApplicationContext context: Context): AppDatabase {
            return Room.databaseBuilder(context, AppDatabase::class.java, "mdm.db").build()
        }
    }
}